package com.hgw.springsecurityjwtdemo02.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Description:
 * Data time:2022/9/1 12:02
 * Author:TQ-3038-HuangGongWei
 */
@RestController
public class HelloController {

    @RequestMapping("/hello")
    @PreAuthorize("hasAnyAuthority('test')")
    public String hello() {
        return "HelloWorld!";
    }
}
